<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>带分页的显示数据方法</title>
<style type="text/css">
body {
	font: normal 11px auto "Tr ebuchet MS", Verdana, Arial, Helvetica,
		sans-serif;
	color: #4f6b72;
	background: #E6EAE9;
}

table {
	width: 700px;
	padding: 0;
	margin: 0;
}

td {
	border-right: 1px solid #C1DAD7;
	border-bottom: 1px solid #C1DAD7;
	font-size: 11px;
	padding: 6px 6px 6px 12px;
	color: #4f6b72;
}

tr:hover {
	background-color: #B0C4DE;
}

th {
	font: bold 11px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
	color: #4f6b72;
	border-right: 1px solid #C1DAD7;
	border-bottom: 1px solid #C1DAD7;
	border-top: 1px solid #C1DAD7;
	letter-spacing: 2px;
	text-transform: uppercase;
	text-align: center;
	padding: 6px 6px 6px 12px;
	background: #CAE8EA no-repeat;
}

a:link {
	color: red;
	text-decoration: none;
}

a:hover {
	color: blue;
	text-decoration: none;
}

a:visited {
	color: green;
	text-decoration: none;
}

a:active {
	color: orange;
	text-decoration: none;
}
</style>
<script type="text/javascript">
function deleteorgin(id){
	if(confirm("是否确认删除！")){
		window.location.href="orgin!deleteorgin.action?organ.org_id="+id;
	}
	
}
</script>
</head>
<body topmargin="100px">

<table align="center">
	<caption><strong><h2>机构信息管理</h2></strong></caption>
		<tr>
			<th>机构名称</th>
			<th>机构昵称</th>
			<th>机构状态</th>
			<th>机构级别</th>
			<th>机构邮箱</th>
			<th>操作</th>
		</tr>
		<s:iterator value="queryUtils.pagelist" id="list">
		<tr>
		<tr>
				<td><s:property value="org_name"/></td>
				<td><s:property value="nick_name"/></td>
				<td>
				<s:if test="state==0">未通过审核</s:if>
				<s:if test="state!=0">通过审核</s:if>
				<input type="hidden" id="id" value="<s:property value='org_id'/>"/>
				</td>
				<td><s:property value="org_level"/></td>
				<td><s:property value="mail"/></td>
				<td><a href="javascript:deleteorgin('<s:property value='org_id'/>');">删除</a> /
				<a href="<%=request.getContextPath() %>/backend/orgin!findbyid.action?organ.org_id=<s:property value='org_id'/>">修改</a></td>
			</tr>
		</tr>
		</s:iterator>
		
		<!--使用c标签显示页面代码
		<c:forEach items="${queryUtils.pagelist }" var="list">

			<tr>
				<td>${list.org_name }</td>
				<td>${list.nick_name}</td>
				<td>
				<c:if test="${list.state==0 }">未通过审核</c:if>
				<c:if test="${list.state==1 }">通过审核</c:if>
				<input type="hidden" id="id" value="${list.org_id }"/>
				</td>
				<td>${list.org_level}</td>
				<td>${list.mail}</td>
				<td><a href="javascript:deleteorgin('${list.org_id }');">删除</a> /
				<a href="<%=request.getContextPath() %>/backend/orgin!findbyid.action?organ.org_id=${list.org_id }">修改</a></td>
			</tr>
		</c:forEach>
		  -->
			 
			<tr align="right"><td colspan="6">当前第<s:property value="queryUtils.pageindex"/>页/共<s:property value="queryUtils.pagesum"/>页 共<s:property value="queryUtils.pagetotal"/>条数据 
			<s:property escape="false" value="queryUtils.first"/>
			<s:property escape="false" value="queryUtils.last"/>
			<s:property escape="false" value="queryUtils.next"/>
			<s:property escape="false" value="queryUtils.end"/>
			</td></tr>
			
			 <!-- 使用c标签显示的数据，分页
			<tr align="right"><td colspan="6">当前第${queryUtils.pageindex }页/共${queryUtils.pagesum }页 共${queryUtils.pagetotal }条数据 ${queryUtils.first } ${queryUtils.last } ${queryUtils.next } ${queryUtils.end }</td></tr>	
			 -->
	</table>

</body>
</html>